package vow.gui.models;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.swing.AbstractListModel;

import dispute.NegotiationRoom;

public class RoomListModel extends AbstractListModel{

	private List<NegotiationRoom> rooms;
	
	public RoomListModel(Collection<NegotiationRoom> rooms){
		this.rooms = new ArrayList<NegotiationRoom>(rooms);
	}
	
	@Override
	public int getSize() {
		return rooms.size();
	}

	@Override
	public Object getElementAt(int index) {
		return rooms.get(index);
	}

}
